home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
program
/
fpk65_66.zip
/
SOURCE
/
RTL
/
DOS
/
PRT0.S
< prev
next >
Wrap
Text File
|
1996-11-07
|
2KB
|
75 lines
//****************************************************************************
//
// Copyright (c) 1993,1996 by Florian Klaempfl
//
// ****************************************************************************}
//
//
// this file is part of the FPKPascal run time library and contains the
// startup code of FPKPascal
//
// called as start(argc, argv, envp) (c calling conventions)
//
// gs:edx points to such a record:
// size_of_this_structure_in_bytes : longint;
// linear_address_of_primary_screen : longint;
// linear_address_of_secondary_screen : longint;
// linear_address_of_transfer_buffer : longint;
// size_of_transfer_buffer : longint;
// pid : longint;
// master_interrupt_controller_base : byte
// slave_interrupt_controller_base : byte
// selector_for_linear_memory : word;
// linear_address_of_stub_info_structure : longint;
// linear_address_of_original_psp : longint;
// run_mode : word;
// run_mode_info : word;
.text
.long 0 /* in case of null references */
.long 0
.globl start
start:
movw %gs:36(%edx),%ax
movw %ax,_run_mode
movw %gs:26(%edx),%ax
movw %ax,_core_selector
movl %ebx,_ScreenPrimary
movl %esp,%ebx
movl 8(%ebx),%eax
movl %eax,_environ
movl 4(%ebx),%eax
movl %eax,_args
movl (%ebx),%eax
movl %eax,_argc
call PASCALMAIN
movl $0x4c00,%eax
int $0x21
ret
.data
.globl _environ
_environ:
.long 0
.globl _ScreenPrimary
_ScreenPrimary:
.long 0
.globl _run_mode
_run_mode:
.word 0
.globl _core_selector
_core_selector:
.word 0
.globl _argc
_argc:
.long 0
.globl _args
_args:
.long 0